import re
def replace_block(file_path, original_block_head, new_block_content):
	with open(file_path, 'r', encoding='utf-8') as file:
		file_data = file.read()

	# block_start = original_block_head

	# regex_pattern = r'({}.*?})'.format(re.escape(original_block_head))
	regex_pattern ='(' + original_block_head + ' = \\{.*?\\})'

	# Use regex_pattern to replace
	updated_data = re.sub(regex_pattern, new_block_content, file_data, flags=re.DOTALL)
		# updated_data = re.sub(r'(diff_normal_player = \{.*?\})', new_block_content, file_data, flags=re.DOTALL)

	with open(file_path, 'w', encoding='utf-8') as file:
		file.write(updated_data)

	print("All blocks is replaced!")